package com.junqson.je.user.client;

import com.junqson.je.common.model.ApiResult;
import com.junqson.je.common.model.dto.MailDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Descriptions
 * @Company
 * @Author Junqson
 * @Date 2020/1/19 15:38
 * @Version 1.0
 */
@FeignClient("je-msg")
public interface MsgClient {
    @GetMapping("/sendCode")
    boolean sendCode(@RequestParam("phone") String phone,
                     @RequestParam("code") String code);

    @PostMapping("/sendMail")
    ApiResult sendMail(@RequestBody MailDTO mail);
}
